<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>薪资想过万，代码敲三遍</title>
		<!-- 2.  引入css 和 js -->
		<link rel="stylesheet" href="./bootstrap/bootstrap.min.css">
		<link rel="stylesheet" href="./bootstrap/bootstrap-icons.css">
		<script src="./bootstrap/bootstrap.min.js"></script>
		<style>
			#myToast {
				width: 200px;
				height: 50px;
				background-color: pink;
				line-height: 50px;
				position: fixed;
				left: 50%;
				transform: translateX(-50%);
				text-align: center;
			}
		</style>
    </head>
    <body>
		<!-- 1.   给轻提示盒子添加类 -->
        <div id="myToast" class="toast">我是提示</div>

        <script>
			// 3.  创建轻提示对象
			const toastBox = document.querySelector('#myToast')
			const toast = new bootstrap.Toast(toastBox , {
				animation : true,	//是否开启动画
				autohide : true,	//是否自动隐藏
				delay : 3000,		//3000毫秒后自动隐藏
			})

			//4.  显示轻提示
			toast.show()
		</script>
    </body>
</html>